package cn.lysj.framework.customer.domain;

import cn.lysj.framework.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Entity;
import java.util.Date;

/**
 * @author zwj
 * @description 用户优惠券
 * @create 2019-01-15 15:44:14
 **/
@Data
@Entity
@EqualsAndHashCode(callSuper=true)
public class CustomerVipCoupon extends BaseEntity {
    private String customerVipId;//vipId
    private String couponId;     //优惠券Id
    private Integer useType;     //使用状态 1.未使用 2.已经使用
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginDate;      //有效期开始时间
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;        //有效期结束时间

    public CustomerVipCoupon() {
    }

    public CustomerVipCoupon(String customerVipId, String couponId, Integer useType, Date beginDate, Date endDate) {
        this.customerVipId = customerVipId;
        this.couponId = couponId;
        this.useType = useType;
        this.beginDate = beginDate;
        this.endDate = endDate;
    }
}
